package day09.KeJian;

import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;

public class MySet1 {
    public static void main(String[] args) {
        Set<String> set = new TreeSet<>();
        set.add("asd");
        set.add("zxc");
        set.add("qwe");
        set.add("qaz");


        Iterator<String> it = set.iterator();
        while (it.hasNext()){
            String s = it.next();
            System.out.println(s);

        }
        System.out.println("================================");
        for (String s : set) {
            System.out.println(s);

        }
    }
}
